<!-- BEGIN:main -->


<script>
    $(function() {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true
        });
    });

    function submitForm(action)
    {
        var title = $('#txtTitle');                                
        var hasError = validateEmptyValue(title);
        
        if(hasError){
            alert('Vui lòng điền đầy đủ thông tin');
        }else{
            var alias = $('#txtAlias');
            if(alias.val()==''){
                alias.val(title.val());
            }            
            var form = document.phpForm;        
            form.hdAction.value = action;
            form.submit();
        }

    }
</script>





<div id="toolbar-box">
    <div class="d_divide5"></div>
    <div class="toolbar" id="toolbar">
        <table class="toolbar">
            <tbody>
                <tr>
                    <td class="button" id="toolbar-save">
                        <a href="javascript:void()" onclick="submitForm('addAndExit')" class="toolbar">
                            <span class="icon-32-save" title="Lưu và thoát">
                            </span>
                            Lưu và thoát
                        </a>
                    </td>


                    <td class="button" id="toolbar-apply">
                        <a href="javascript:void()" onclick="submitForm('add')" class="toolbar">
                            <span class="icon-32-apply" title="Lưu">
                            </span>
                            Lưu
                        </a>
                    </td>


                    <td class="button" id="toolbar-cancel">
                        <a href=".?com=com_menu&view=category&task=view" class="toolbar">
                            <span class="icon-32-cancel" title="Hủy">
                            </span>
                            Hủy
                        </a>
                    </td>

                </tr>
            </tbody>
        </table>
    </div>
    <div class="header icon_48_menu_category_add">
        Nhóm danh mục: <small><small>[ Thêm mới ]</small></small><br>
    </div>

    <div class="d_divide5"></div>
</div>

<div class="d_divide10"></div>
<div class="d_clear"></div>

<div id="element-box">


    <form method="post" name="phpForm">
        <input type="hidden" name="hdAction"/>

        <fieldset class="adminform">
            <legend>Chi tiết</legend>

            <table class="admintable">
                <tbody>
                    <tr>
                        <td >
                            <label for="txtTitle" class="d_label">Tên: <b style="color: red;font-size: 14px;">*</b></label>
                        </td>
                        <td>
                            <input style="width: 350px;"  class="d_text_input" name="txtTitle" id="txtTitle" value="" size="50" maxlength="50" title="Tên danh mục" type="text" />
                        </td>  
                        <td >
                            <label for="datepicker" class="d_label">
                                Ngày tạo: 
                            </label>
                        </td>
                        <td >					
                            <input value="{TODAY}" readonly="true" id="datepicker"  class="d_text_input" style="WIDTH: 80px;" name="createdDate" />
                        </td> 

                    </tr>
                    <tr>
                        <td>
                            <label for="txtAlias" class="d_label">Alias:</label>
                        </td>

                        <td>
                            <input style="width: 350px; " class="d_text_input" name="txtAlias" id="txtAlias" value="" size="50" maxlength="50" title="Alias" type="text" />
                        </td> 

                        <td >
                            <label class="d_label" >Bật/Tắt: </label>
                        </td>
                        <td >
                            <input name="rdoState" value="0"  type="radio"  />
                            <label >Tắt</label>
                            <input name="rdoState" value="1" checked="checked"  type="radio" />
                            <label >Bật</label>
                        </td>                                                                                  					                    
                    </tr>

                </tbody></table>
        </fieldset>

        <fieldset class="adminform">
            <legend>Sự miêu tả</legend>


            <textarea name="txtDescription" id="txtDescription"></textarea>
            <script language="javascript" type="text/javascript">
                CKEDITOR.replace('txtDescription',
                {
                    filebrowserBrowseUrl: '../blugin/ckeditor3.6.4/ckfinder/ckfinder.html',
                    filebrowserImageBrowseUrl: '../blugin/ckeditor3.6.4/ckfinder/ckfinder.html?type=Images',
                    filebrowserFlashBrowseUrl: '../blugin/ckeditor3.6.4/ckfinder/ckfinder.html?type=Flash',
                    height: 250,
                    toolbarStartupExpanded: false
                });
            </script>

        </fieldset>





    </form>
</div>
<noscript>
!Cảnh báo! Javascript phải được bật để chạy được các chức năng trong phần Quản trị		</noscript>

<!-- END:main -->